package initialize

import (
	"fmt"
	"ksirGo/global"
	"ksirGo/utils"

	"go.uber.org/zap"
)

func Logger() *zap.Logger {
	zapConfig := zap.NewDevelopmentConfig()
	zapConfig.OutputPaths = []string{
		fmt.Sprintf("%s/log_%s.log", global.CONFIG.Zap.LogPath, utils.GetNowDateStr()),
		"stdout",
	}
	logger, _ := zapConfig.Build()
	// zap.ReplaceGlobals(logger)
	return logger
}
